import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class java1 {
    public static void main(String[] args) {
        ArrayList<String> arr=new ArrayList<>();
        Collections.addAll(arr, "张三,21", "李四,24", "丁真,26", "珍珠,27", "锐刻五,30");
        System.out.println(arr);
        Map<String,Integer> person=new HashMap<>();
        for (String arr1:arr){
            String[] people=arr1.split(",");
            if(people.length==2) {
                String name = people[0];
                int age = Integer.parseInt(people[1]);
               if (age>24){
                   person.put(name,age);
               }
            }
        }
        System.out.println(person);
    }
}
